from ultralytics import YOLO

# Load a model
model = YOLO("config_obj/yolov8n.yaml")# build from YAML and transfer weights

# Train the model
epoch=5
results = model.train(data="config_obj/data.yaml", epochs=epoch, imgsz=640,device="cpu", batch=2,ch=1,close_mosaic=epoch,hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=10, translate=0.1, scale=0.2, shear=0.1, perspective=0.0005, flipud=0.0,fliplr=0.0, mosaic=0.0, mixup=0.0)
